<template>
	<view class="page">
		<!-- <view class="tzxcxBtn">
			点击跳转小程序
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url:'',
				openlink:''
			}
		},
		onUnload() {
		}, 
		onShow() {
			this.tzSkip()
		},
		methods: {
			tzSkip(){
				this.url = window.location.href;
				// this.url = 'https://maxbox.henkuaikeji.com/h5/#/pages/tabBar/h5Link?share_ma=8535914&bdx_monitor_append_params=%7B%22enter_from%22%3A%22im_share_web%22%7D&from_im=true&disable_auto_expose=1&font_scale=0.86';
				let urlArr = this.url.split("=")[1];
				// console.log(urlArr,'urlArr');
				let urlData = urlArr.split("&")[0];
				// console.log(urlData,'urlData');
				this.$http({
					url: "api/index/weixin?pid="+urlData,
				}).then(res => {
					this.openlink = res.data.data.url_link
					// console.log(this.openlink,'this.openlink');
					if(this.openlink){
						location.href = this.openlink
					}
				}).catch(err => {
					console.log(err);
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	.page{
		// width: 100vw;
		// height: 100vh;
		// position: relative;
		// background-image: url('../../pagesA/static/bg.png');
		// background-size: 100% 100%;
		// .tzxcxBtn{
		// 	width: 300rpx;
		// 	height: 80rpx;
		// 	line-height: 80rpx;
		// 	text-align: center;
		// 	font-size: 32rpx;
		// 	border-radius: 20rpx;
		// 	color: #FFFFFF;
		// 	background-color: #f28b5c;
		// 	position: absolute;
		// 	left: 50%;
		// 	transform: translateX(-50%);
		// 	bottom: 0;
		// }
	}

</style>
